<?xml version="1.0"?>
<!DOCTYPE xsl:stylesheet [
  <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
  <!ENTITY dc "http://purl.org/dc/elements/1.1/">
  <!ENTITY dcterms "http://purl.org/dc/terms/">
  <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
  <!ENTITY a "http://xmlns.heustics.org/schema/myelin/0.1/">
  <!ENTITY m "http://xmlns.heustics.org/ontology/myelin/0.1/">
]>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  xmlns:xf="http://www.w3.org/2002/xforms" 
  xmlns:l="http://xmlns.heustics.org/schema/i18n/0.1/"
  xmlns:a="http://xmlns.heustics.org/schema/myelin/0.1/"   
  xmlns:g="http://xmlns.heustics.org/schema/myelin/0.1/GroupAccount#"
  xmlns:p="http://xmlns.heustics.org/schema/myelin/0.1/AgentAccount#"
  xmlns:o="http://xmlns.heustics.org/schema/myelin/0.1/GroupAccount#new" 
  exclude-result-prefixes="xsl xf l a o g p"
>   
  <xsl:variable name="o:l10n" select="a:get-l10n('&a;GroupAccount#new')"/>
  <xsl:variable name="o:titles-l10n" select="$o:l10n/l:context[@name='titles']/*"/>  
  
  <xsl:template match="a:title[@key='new-group']" mode="a:head-content">
    <xsl:call-template name="a:head-title">
      <xsl:with-param name="title" select="$o:titles-l10n[1]"/>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template match="a:title[@key='new-group']" mode="a:page-header">
    <xsl:call-template name="a:page-header-title">
      <xsl:with-param name="title" select="$o:titles-l10n[1]"/>
    </xsl:call-template>
  </xsl:template> 
  
  <xsl:template match="a:nick" mode="a:input-show"> 
    <xsl:call-template name="p:nick-input">
      <xsl:with-param name="params-l10n" select="$g:params-l10n"/>
      <xsl:with-param name="hints-l10n" select="$g:hints-l10n"/>
    </xsl:call-template>
  </xsl:template> 
  
  <xsl:template match="a:form[@mode='main' and @status='commit-success']">
    <xsl:param name="l10n" select="$o:l10n/l:context[@name='commit-success']/*"/>
    <xsl:variable name="model" select="xf:model[1]"/>
    <xsl:variable name="inst" select="$model/xf:instance[1]/*"/> 
    <div class='node_request_form {@action}'>    
      <h3> 
        <span>  
          <xsl:value-of select="$l10n[@key='title']"/>
          <em><xsl:value-of select="concat($inst/a:agent/a:nick, '@', $inst/a:memberships/a:domain/@selected)"/></em>
        </span>
      </h3>           
      <p>        
        <xsl:value-of select="$l10n[@key='description']"/>
      </p>
      <div class="cancel">
        <a href="{a:format-repeat-request(@target-action,@target)}">
          <xsl:value-of select="$l10n[@key='return']"/>
        </a>
      </div>       
      <div class="spacer"/>
    </div>    
  </xsl:template>   
  
</xsl:stylesheet>

